<?php



?>

<?php include $this->getLayoutFile('block_top_messages'); ?>
<form class="form1" method="post" action="<?php echo $requestAction; ?>">

    <fieldset>
        <legend> 編輯 </legend>

        <div class="leftBlock">

            <div class="field">
                <label for="name"> 名稱 </label>
                <div class="show"><input type="text" id="name" name="name" value="<?php echo $userServiceCategory->getName(); ?>" /></div>
                <div class="info"></div>
                <?php $errorField="name"; include $this->getLayoutFile('block_fields'); ?>
            </div>

            <div class="field">
                <label for="description"> 簡略說明 </label>
                <div class="show"><input type="text" id="description" name="description" value="<?php echo $userServiceCategory->getDescription(); ?>" /></div>
                <div class="info"></div>
                <?php $errorField="description"; include $this->getLayoutFile('block_fields'); ?>
            </div>

            <div class="field">
                <label for="status"> 狀態 </label>
                <div class="show">
                    <select id="status" name="status">
                        <?php 
                            foreach( $userServiceCategory->getStatusList('status') as $name => $id ) {
                                $selected = '';
                                if( $userServiceCategory->getStatus()==$id ) {
                                    $selected = ' selected="selected" ';
                                }
                                echo "<option value='{$id}' >". $userServiceCategory->trByName($name) ."</option>";
                            }
                        ?>
                    </select>
                </div>
                <div class="info"></div>
                <?php $errorField="status"; include $this->getLayoutFile('block_fields'); ?>
            </div>

            <div class="field">
                <label for="orderedPages"> 排序值 </label>
                <div class="show"><input type="text" id="orderedPages" name="orderedPages" value="<?php echo $userServiceCategory->getOrderedPages(); ?>" /></div>
                <div class="info"></div>
                <?php $errorField="orderedPages"; include $this->getLayoutFile('block_fields'); ?>
            </div>

        </div>
        <div class="rightBlock">

            <div class="field">
                <label for="name"> Key </label>
                <div class="show">
                    <?php echo $userServiceCategory->getKeyName(); ?>
                </div>
            </div>
            
        </div>
        <div class="submitBlock">

            <input class="submit" type="submit" value="修改" />

        </div>
    </fieldset>

</form>
